import request from '@/utils/request'

//==================================
//       careUser
//==================================
let careUser = {
  list(data) {
    return request({
      url: '/ele/v1/careUser/list',
      method: 'get',
      params: data
    })
  },
  modify(data) {
    return request({
      url: '/ele/v1/careUser/modify',
      method: 'post',
      data
    })
  },
  add(data) {
    return request({
      url: '/ele/v1/careUser/add',
      method: 'post',
      data
    })
  }
}

//==================================
//       careUnit
//==================================
let careUnit = {
  list(data) {
    return request({
      url: '/ele/v1/careUnit/list',
      method: 'get',
      params: data
    })
  },
  modify(data) {
    return request({
      url: '/ele/v1/careUnit/modify',
      method: 'post',
      data
    })
  },
  add(data) {
    return request({
      url: '/ele/v1/careUnit/add',
      method: 'post',
      data
    })
  }
}

//==================================
//       careGroup
//==================================
let careGroup = {
  list(data) {
    return request({
      url: '/ele/v1/careGroup/list',
      method: 'get',
      params: data
    })
  },
  modify(data) {
    return request({
      url: '/ele/v1/careGroup/modify',
      method: 'post',
      data
    })
  },
  add(data) {
    return request({
      url: '/ele/v1/careGroup/add',
      method: 'post',
      data
    })
  }
}

//==================================
//       careMember
//==================================
let careMember = {
  listByGroupId(data) {
    return request({
      url: '/ele/v1/careMember/listByGroupId',
      method: 'get',
      params: data
    })
  },
  removeById(data) {
    return request({
      url: '/ele/v1/careMember/removeById',
      method: 'get',
      params: data
    })
  },
  add(data) {
    return request({
      url: '/ele/v1/careMember/add',
      method: 'post',
      data
    })
  }
}

//==================================
//       elevator
//==================================
let elevator = {
  list(data) {
    return request({
      url: '/ele/v1/elevator/list',
      method: 'get',
      params: data
    })
  }
  ,
  modify(data) {
    return request({
      url: '/ele/v1/elevator/modify',
      method: 'get',
      params: data
    })
  }
  ,
  add(data) {
    return request({
      url: '/ele/v1/elevator/add',
      method: 'post',
      data
    })
  }
}

let ele = {elevator, careUser, careGroup, careMember, careUnit}

export default ele;
